﻿
namespace SRTSolutions.Elevate.Guide
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using NUnit.Framework;
    using SRTSolutions.Elevate;
    [TestFixture]
    public class PipeTo
    {

        [Test]
        public void ItsAlmostLikeExtensionMethodSyntaxForStatics()
        {
            //an Action example
            "hello".PipeTo(Console.Write);
            
            // a func example
            var e = "hello".PipeTo<string,bool>(System.IO.File.Exists);

            // func with lambda example
            var H = "hello".PipeTo(s => s.ToUpper());
            Assert.AreEqual("HELLO", H);
        }

    }
}